package com.book.bookmanage.config.execption;

import com.book.bookmanage.constant.ResponseEnum;
import lombok.Data;
import lombok.ToString;

@Data
@ToString
public class CustomException extends RuntimeException {
    private int code;
    private String msg;

    public CustomException(ResponseEnum responseEnum) {
        this.code = responseEnum.getCode();
        this.msg = responseEnum.getMsg();
    }
}
